import { GET } from "./api";

const base = ''
// const base = '/longyuan'
// -----------龙源--------------------
// 获取项目
export const projects =  (param)=> {
    return GET(base + "/projects", param)
}

// 按时间维度获取用电数据
export const powerTradingData =  (param)=> {
    // ?projectIds=1&recordDate=2025-08-19
    return GET(base + "/powerTradingData", param)
}

// 按日期维度获取用电数据
export const dailySummary =  (param)=> {
    // ?projectIds=1,2&startDate=2025-08-19&endDate=2025-08-20
    return GET(base + "/dailySummary", param)
}

// 按日期数据导出
export const dailySummaryExport =  (param)=> {
    // ?projectIds=1,2&startDate=2025-08-15&endDate=2025-08-25
    return GET(base + "/dailySummary/export", param, {'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'})
}

// 按时间导出数据
export const powerTradingDataExport =  (param)=> {
    // ?projectIds=1,2&recordDate=2025-08-20
    return GET(base + "/powerTradingData/export", param, {'Content-Type': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'})
}